import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { WebsiteAuditVO, WebsiteAuditForm, WebsiteAuditQuery } from '@/api/logic/websiteAudit/types';

/**
 * 查询站点审核管理列表
 * @param query
 * @returns {*}
 */

export const listWebsiteAudit = (query?: WebsiteAuditQuery): AxiosPromise<WebsiteAuditVO[]> => {
  return request({
    url: '/logic/websiteAudit/list',
    method: 'get',
    params: query
  });
};

/**
 * 查询站点审核管理详细
 * @param auditId
 */
export const getWebsiteAudit = (auditId: string | number): AxiosPromise<WebsiteAuditVO> => {
  return request({
    url: '/logic/websiteAudit/' + auditId,
    method: 'get'
  });
};

/**
 * 新增站点审核管理
 * @param data
 */
export const addWebsiteAudit = (data: WebsiteAuditForm) => {
  return request({
    url: '/logic/websiteAudit',
    method: 'post',
    data: data
  });
};

/**
 * 修改站点审核管理
 * @param data
 */
export const updateWebsiteAudit = (data: WebsiteAuditForm) => {
  return request({
    url: '/logic/websiteAudit',
    method: 'put',
    data: data
  });
};

/**
 * 删除站点审核管理
 * @param auditId
 */
export const delWebsiteAudit = (auditId: string | number | Array<string | number>) => {
  return request({
    url: '/logic/websiteAudit/' + auditId,
    method: 'delete'
  });
};
